<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="google" value="notranslate">
  <link rel="shortcut icon" href="https://cdn.1717youxue.com/static/site/scratch/favicon.ico">
  <link rel="stylesheet" href="https://cdn.1717youxue.com/static/site/share/css/modal.css">
  <link rel="stylesheet" href="https://cdn.1717youxue.com/static/site/common/libs/jquery.messagetip.css">
  <script src="https://cdn.1717youxue.com/static/lib/jquery-3.4.1.min.js"></script>
  <!--bootstrap-->
  <link rel="stylesheet" href="http://cdn.1717youxue.com/static/lib/bootstrap/css/bootstrap.min.css">
  <script src="http://cdn.1717youxue.com/static/lib/bootstrap/js/popper.min.js"></script>
  <script src="http://cdn.1717youxue.com/static/lib/bootstrap/js/bootstrap.min.js"></script>
  <script src="https://cdn.1717youxue.com/static/site/common/libs/jquery.messagetip.js"></script>
  <title>Scratch 3.0 GUI: Compatibility Testing</title>
  
  <script src="static/main.js"></script>
</head>

<body>
  <div id="scratch">
    
  </div>

  <div id="loading_modal" class="modal" style="display: none">
    <div class="spinner">
      <div class="bounce1"></div>
      <div class="bounce2"></div>
      <div class="bounce3"></div>
    </div>
  </div>

  <div class="modal fade" id="publish" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document" style="max-width: 700px;">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="projectTitle">作品名称</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="container">
            <div class="row">
              <div class="col-6" id="projectCover">
              
              </div>
              <div class="col-6">
                <div class="container">
                  <div class="row">
                    <span style="color: red;padding-right: 2px;">*</span>
                    <span style="color: #333333;margin-bottom: 5px;font-size: 14px;">作品简介：</span><br>
                    <textarea class="form-control" id="workDesc" rows="4"></textarea>
                  </div>
                  <div class="row">
                    <span style="color: red;padding-right: 2px;margin-top: 5px;">*</span>
                    <span style="color: #333333;margin-bottom: 5px;margin-top: 5px;font-size: 14px;">操作说明：</span><br>
                    <textarea class="form-control" id="operateDesc" rows="4"></textarea>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" style="width:120px;" class="btn btn-secondary" data-dismiss="modal">关闭</button>
          <button type="button" style="width:120px;" class="btn btn-primary" onclick="onShare();">提交</button>
        </div>
      </div>
    </div>
  </div>
<script type="text/javascript" src="lib.min.js"></script><script type="text/javascript" src="chunks/compatibilitytesting.js"></script></body>
<script>
window.assetJSON = {
  sprites: {},
  sounds: {},
  backdrops: {},
  costumes: {}
};  

window.showLoading(1);
$(document).ready(function(){ 
    $.ajaxSettings.async = false;
    let assetJSON = window.assetJSON;
    for (a in assetJSON) {
      //console.log("https://cdn.1717youxue.com/static/site/scratch/assets/json/"+a+".json");
      $.getJSON("https://cdn.1717youxue.com/static/site/scratch/assets/json/"+a+".json", function(data){
          window.assetJSON[a] = data;
      });
    }
    //window.showLoading(0); 
    $.ajaxSettings.async = true;

    let workId = window.getUrlParam("workId");
    if (workId) {
      let rs = window.getWorkInfo(workId);
      if (rs) {
        window.scratchConfig.workInfo = rs;
        window.scratchConfig.defaultProjectURL = rs.workFileUrl;
        $("#workDesc").val(rs.workDesc);
        $("#operateDesc").val(rs.operateDesc);
      }
    }

    //处理登陆 
    window.getUserInfo();
    window.showLoading(0);
});
</script>

</html>